<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class TTpApp</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class TTpApp</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Application framework object.</p>
<p class="description"><p>Implements the TurboPhp application framework, including parsing the input  template, handling input, and generating HTML.  The behaviour of the application is customized by attaching event handlers.</p></p>
		<p class="notes">
			Located in <a class="field" href="_TpLib_php.html">/TpLib.php</a> (line <span class="field"><a href="..//__filesource/fsource_TurboPhpLib__TpLib.php.html#a175">175</a></span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>



	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
								<div class="var-title">
					<span class="var-type">array</span>
					<a href="#$Blocks" title="details" class="var-name">$Blocks</a>
				</div>
								<div class="var-title">
					<span class="var-type">boolean</span>
					<a href="#$Debug" title="details" class="var-name">$Debug</a>
				</div>
								<div class="var-title">
					<span class="var-type">boolean</span>
					<a href="#$Handled" title="details" class="var-name">$Handled</a>
				</div>
								<div class="var-title">
					<span class="var-type">array</span>
					<a href="#$Objects" title="details" class="var-name">$Objects</a>
				</div>
								<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$OnBeforeClicks" title="details" class="var-name">$OnBeforeClicks</a>
				</div>
								<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$OnBeforeInput" title="details" class="var-name">$OnBeforeInput</a>
				</div>
								<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$OnGenerate" title="details" class="var-name">$OnGenerate</a>
				</div>
								<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$TemplateFile" title="details" class="var-name">$TemplateFile</a>
				</div>
							</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
								
				<div class="method-definition">
											<span class="method-result">TTpApp</span>
										<a href="#TTpApp" title="details" class="method-name">TTpApp</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$inFile</span>)
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#DumpBlocks" title="details" class="method-name">DumpBlocks</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#DumpObjects" title="details" class="method-name">DumpObjects</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#DumpRequest" title="details" class="method-name">DumpRequest</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#Generate" title="details" class="method-name">Generate</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">object Returns</span>
										<a href="#GetBlock" title="details" class="method-name">GetBlock</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$inName</span>)
									</div>
								
				<div class="method-definition">
											<span class="method-result"><a href="../TurboPhpLib/TTpObj.html">TTpObj</a></span>
										<a href="#GetObject" title="details" class="method-name">&amp;GetObject</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$inName</span>)
									</div>
								
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#Interpolate" title="details" class="method-name">Interpolate</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">&$inText</span>)
									</div>
								
				<div class="method-definition">
											<span class="method-result">boolean</span>
										<a href="#IsBlock" title="details" class="method-name">IsBlock</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$inName</span>)
									</div>
								
				<div class="method-definition">
											<span class="method-result">boolean</span>
										<a href="#IsObject" title="details" class="method-name">IsObject</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$inName</span>)
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#ParseTemplate" title="details" class="method-name">ParseTemplate</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#Redirect" title="details" class="method-name">Redirect</a>
											(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$inUrl</span>)
									</div>
							</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="var$Blocks" id="$Blocks"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$Blocks</span>
						(line <span class="line-number"><a href="..//__filesource/fsource_TurboPhpLib__TpLib.php.html#a184">184</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Array of named macro expansions.</p>
<p class="description"><p>When generating HTML, encountered macros of the form {%MacroName} are  replaced by matching blocks from this array. E.g. {%MacroName}  is replaced by <var>$Blocks['MacroName']</var>.</p></p>
	
	
		
		

</div>
<a name="var$Debug" id="$Debug"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">boolean</span>
			<span class="var-name">$Debug</span>
						(line <span class="line-number"><a href="..//__filesource/fsource_TurboPhpLib__TpLib.php.html#a190">190</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Enable debugging output.</p>
<p class="description"><p>If false, debugging output is suppressed.</p></p>
	
	
		
		

</div>
<a name="var$Handled" id="$Handled"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">boolean</span>
			<span class="var-name">$Handled</span>
						(line <span class="line-number"><a href="..//__filesource/fsource_TurboPhpLib__TpLib.php.html#a197">197</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Halt generation.</p>
<p class="description"><p>If true, the application returns from the <a href="../TurboPhpLib/TTpApp.html#methodGenerate">Generate</a> function without  further processing.</p></p>
	
	
		
		

</div>
<a name="var$Objects" id="$Objects"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$Objects</span>
						(line <span class="line-number"><a href="..//__filesource/fsource_TurboPhpLib__TpLib.php.html#a210">210</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Array of named objects.</p>
<p class="description"><p>TurboPhp objects managed by the application are stored in this array.  All members of this array must derive from <a href="../TurboPhpLib/TTpObj.html">TTpObj</a>.</p><p><strong>Warning:</strong> be careful accessing this array; objects must always be  accessed by reference. Use methods <a href="../TurboPhpLib/TTpApp.html#methodIsObject">IsObject</a> or <a href="../TurboPhpLib/TTpApp.html#methodGetObject">GetObject</a>  instead.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$OnBeforeClicks" id="$OnBeforeClicks"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$OnBeforeClicks</span>
						(line <span class="line-number"><a href="..//__filesource/fsource_TurboPhpLib__TpLib.php.html#a224">224</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Name of OnBeforeClicks event function.</p>
<p class="description"><p>This event is fired before any clicks are processed.</p></p>
	
	
		
		

</div>
<a name="var$OnBeforeInput" id="$OnBeforeInput"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$OnBeforeInput</span>
						(line <span class="line-number"><a href="..//__filesource/fsource_TurboPhpLib__TpLib.php.html#a217">217</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Name of OnBeforeInput event function.</p>
<p class="description"><p>This event is fired before any input is processed.</p></p>
	
	
		
		

</div>
<a name="var$OnGenerate" id="$OnGenerate"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$OnGenerate</span>
						(line <span class="line-number"><a href="..//__filesource/fsource_TurboPhpLib__TpLib.php.html#a231">231</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Name of OnGenerate event function.</p>
<p class="description"><p>This event is fired before output is generated.</p></p>
	
	
		
		

</div>
<a name="var$TemplateFile" id="$TemplateFile"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$TemplateFile</span>
						(line <span class="line-number"><a href="..//__filesource/fsource_TurboPhpLib__TpLib.php.html#a244">244</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Name of template file.</p>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																	<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodTTpApp" id="TTpApp"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">Constructor TTpApp</span> (line <span class="line-number"><a href="..//__filesource/fsource_TurboPhpLib__TpLib.php.html#a258">258</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	
	<div class="method-signature">
		<span class="method-result">TTpApp</span>
		<span class="method-name">
			TTpApp
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$inFile</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$inFile</span><span class="var-description">: Value to store in <a href="../TurboPhpLib/TTpApp.html#var$TemplateFile">TemplateFile</a>.</span>			</li>
				</ul>
		
		
	</div>
<a name="methodDumpBlocks" id="DumpBlocks"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">DumpBlocks</span> (line <span class="line-number"><a href="..//__filesource/fsource_TurboPhpLib__TpLib.php.html#a729">729</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Dump all blocks to debug output.</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			DumpBlocks
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodDumpObjects" id="DumpObjects"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">DumpObjects</span> (line <span class="line-number"><a href="..//__filesource/fsource_TurboPhpLib__TpLib.php.html#a708">708</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Dump all objects to debug output.</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			DumpObjects
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodDumpRequest" id="DumpRequest"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">DumpRequest</span> (line <span class="line-number"><a href="..//__filesource/fsource_TurboPhpLib__TpLib.php.html#a692">692</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Dump request datat to debug output.</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			DumpRequest
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodGenerate" id="Generate"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">Generate</span> (line <span class="line-number"><a href="..//__filesource/fsource_TurboPhpLib__TpLib.php.html#a668">668</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Run the TurboPhp application.</p>
<p class="description"><p>Process all input and generate output. Fire events as needed.</p></p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			Generate
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodGetBlock" id="GetBlock"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">GetBlock</span> (line <span class="line-number"><a href="..//__filesource/fsource_TurboPhpLib__TpLib.php.html#a507">507</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get the value of a named macro block.</p>
	<ul class="tags">
				<li><span class="field">return:</span> the value of the named block if it exists,  '' otherwise.</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">object Returns</span>
		<span class="method-name">
			GetBlock
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$inName</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$inName</span><span class="var-description">: Name of block to look for.</span>			</li>
				</ul>
		
		
	</div>
<a name="methodGetObject" id="GetObject"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">GetObject</span> (line <span class="line-number"><a href="..//__filesource/fsource_TurboPhpLib__TpLib.php.html#a480">480</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get a reference to the named TurboPhp object.</p>
	<ul class="tags">
				<li><span class="field">return:</span> Returns a reference to the named object if it exists,  false otherwise.</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../TurboPhpLib/TTpObj.html">TTpObj</a></span>
		<span class="method-name">
			&amp;GetObject
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$inName</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$inName</span><span class="var-description">: Name of object to look for.</span>			</li>
				</ul>
		
		
	</div>
<a name="methodInterpolate" id="Interpolate"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">Interpolate</span> (line <span class="line-number"><a href="..//__filesource/fsource_TurboPhpLib__TpLib.php.html#a544">544</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Expand all object and block macros in the input text.</p>
<p class="description"><p>Macro patterns of the form {%Macro} in the input text are  matched against object names, then block names.</p><p>Macros matching objects are replaced by text provided by the object's  TTpObj.Generate() function.</p><p>Block macros are replaced by the stored block value.</p><p>Note: Expanded macro patterns are interpolated recursively.</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> Input text with objects and macros recursively expanded.</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			Interpolate
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">&$inText</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">&$inText</span><span class="var-description">: Reference to input text.</span>			</li>
				</ul>
		
		
	</div>
<a name="methodIsBlock" id="IsBlock"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">IsBlock</span> (line <span class="line-number"><a href="..//__filesource/fsource_TurboPhpLib__TpLib.php.html#a496">496</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Test for existence of a named macro block.</p>
	<ul class="tags">
				<li><span class="field">return:</span> True if the block exists in this application.</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			IsBlock
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$inName</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$inName</span><span class="var-description">: Name of block to look for.</span>			</li>
				</ul>
		
		
	</div>
<a name="methodIsObject" id="IsObject"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">IsObject</span> (line <span class="line-number"><a href="..//__filesource/fsource_TurboPhpLib__TpLib.php.html#a469">469</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Test for existence of a named TurboPhp object.</p>
	<ul class="tags">
				<li><span class="field">return:</span> True if the object exists in this application.</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			IsObject
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$inName</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$inName</span><span class="var-description">: Name of object to look for.</span>			</li>
				</ul>
		
		
	</div>
<a name="methodParseTemplate" id="ParseTemplate"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">ParseTemplate</span> (line <span class="line-number"><a href="..//__filesource/fsource_TurboPhpLib__TpLib.php.html#a579">579</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Parse the template file.</p>
<p class="description"><p>The template file is read and all object and macro codes are parsed.</p></p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			ParseTemplate
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodRedirect" id="Redirect"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">Redirect</span> (line <span class="line-number"><a href="..//__filesource/fsource_TurboPhpLib__TpLib.php.html#a655">655</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Redirect the user's browser to the input url. All other processing  is stopped.</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			Redirect
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$inUrl</span>)
			</div>
	
		
		
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Fri, 12 Nov 2004 16:34:00 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a>
	</p>
	</div></body>
</html>